/** */

<template>
  <span>
    <template v-if="hasValue">{{ compValue }}</template>
    <slot v-else />
  </span>
</template>

<script>
//
// function install(Vue, options) {
//   const { ak } = options
//   Vue.prototype.FCText = () => ({ ak })
//   Vue.component('fc-text', FCText)
// }
//

export default {
  name: 'FCText',
  components: {},
  model: {
    prop: 'value',
    event: 'change',
  },
  props: {
    // value props
    value: [String, Number],

    // view props
    label: [String, Number],

    // value map props
  },
  data() {
    return {}
  },
  computed: {
    compValue() {
      let compValue = this.value || this.label
      return compValue
    },
    hasValue() {
      return this.compValue !== undefined && this.compValue !== null
    },
  },
  watch: {},
  methods: {},
}
</script>

<style></style>
